<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 圆的半径
        var r = 4;
        // 圆周率
        const PI = 3.14;
        document.write("圆的周长为:");
        // 结果加粗
        document.write('<b>');
        document.write(2 * PI * r);
        document.write('</b>');
        document.write("<br>");
        // 半径为4.5的圆面积
        r = 4.5; // 重新给r赋值即可
        document.write("圆的面积为:");
        document.write(PI * r * r);

    </script>
</body>
</html>